# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.BeyondCorp.V1.Model.AppGateway do
  @moduledoc """
  A BeyondCorp AppGateway resource represents a BeyondCorp protected AppGateway to a remote application. It creates all the necessary GCP components needed for creating a BeyondCorp protected AppGateway. Multiple connectors can be authorised for a single AppGateway.

  ## Attributes

  *   `allocatedConnections` (*type:* `list(GoogleApi.BeyondCorp.V1.Model.AllocatedConnection.t)`, *default:* `nil`) - Output only. A list of connections allocated for the Gateway
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when the resource was created.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed 64 characters.
  *   `hostType` (*type:* `String.t`, *default:* `nil`) - Required. The type of hosting used by the AppGateway.
  *   `labels` (*type:* `map()`, *default:* `nil`) - Optional. Resource labels to represent user provided metadata.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Required. Unique resource name of the AppGateway. The name is ignored when creating an AppGateway.
  *   `satisfiesPzi` (*type:* `boolean()`, *default:* `nil`) - Output only. Reserved for future use.
  *   `satisfiesPzs` (*type:* `boolean()`, *default:* `nil`) - Output only. Reserved for future use.
  *   `state` (*type:* `String.t`, *default:* `nil`) - Output only. The current state of the AppGateway.
  *   `type` (*type:* `String.t`, *default:* `nil`) - Required. The type of network connectivity used by the AppGateway.
  *   `uid` (*type:* `String.t`, *default:* `nil`) - Output only. A unique identifier for the instance generated by the system.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when the resource was last modified.
  *   `uri` (*type:* `String.t`, *default:* `nil`) - Output only. Server-defined URI for this resource.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :allocatedConnections =>
            list(GoogleApi.BeyondCorp.V1.Model.AllocatedConnection.t()) | nil,
          :createTime => DateTime.t() | nil,
          :displayName => String.t() | nil,
          :hostType => String.t() | nil,
          :labels => map() | nil,
          :name => String.t() | nil,
          :satisfiesPzi => boolean() | nil,
          :satisfiesPzs => boolean() | nil,
          :state => String.t() | nil,
          :type => String.t() | nil,
          :uid => String.t() | nil,
          :updateTime => DateTime.t() | nil,
          :uri => String.t() | nil
        }

  field(:allocatedConnections, as: GoogleApi.BeyondCorp.V1.Model.AllocatedConnection, type: :list)
  field(:createTime, as: DateTime)
  field(:displayName)
  field(:hostType)
  field(:labels, type: :map)
  field(:name)
  field(:satisfiesPzi)
  field(:satisfiesPzs)
  field(:state)
  field(:type)
  field(:uid)
  field(:updateTime, as: DateTime)
  field(:uri)
end

defimpl Poison.Decoder, for: GoogleApi.BeyondCorp.V1.Model.AppGateway do
  def decode(value, options) do
    GoogleApi.BeyondCorp.V1.Model.AppGateway.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.BeyondCorp.V1.Model.AppGateway do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
